<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php echo $this->_var['meta']; ?>
<link type="text/css" rel="stylesheet" href="<?php echo $this->_var['css_path']; ?>/global.css" />
<link type="text/css" rel="stylesheet" href="<?php echo $this->_var['css_path']; ?>/style.css" />
</head><body>
 
<?php echo $this->fetch('top.html'); ?>
<?php echo $this->fetch('header.html'); ?> 

<div id="main">
  <div id="q2a_list_left">
    <div class="category_list"> <?php if (count ( $this->_var['category_list'] ) > 0): ?>
      <?php $_from = $this->_var['category_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'cat_list');if (count($_from)):
    foreach ($_from AS $this->_var['cat_list']):
?>
      <dl>
        <dt><?php echo $this->_var['cat_list']['value']; ?>：</dt>
        <dd>
        <dd> <span class="all"> <a href="<?php echo $this->_var['site_url']; ?>question/list/<?php echo $this->_var['cat_list']['id']; ?>" <?php if ($this->_var['category_detail']['id'] == $this->_var['cat_list']['id'] || empty ( $this->_var['category_detail']['id'] )): ?>class="current"<?php endif; ?> title="<?php echo $this->_var['cat_list']['value']; ?>">全部</a> </span>
          <ul>
            <?php if (! empty ( $this->_var['cat_list']['children'] )): ?>
            <?php $_from = $this->_var['cat_list']['children']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'children');if (count($_from)):
    foreach ($_from AS $this->_var['children']):
?>
            <li> <a title="<?php echo $this->_var['children']['value']; ?>" href="<?php echo $this->_var['site_url']; ?>question/list/<?php echo $this->_var['children']['id']; ?>" <?php if ($this->_var['category_detail']['id'] == $this->_var['children']['id']): ?>class="current"<?php endif; ?>> <span><?php echo $this->_var['children']['value']; ?></span> </a> </li>
            <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?> 
            <?php endif; ?>
          </ul>
        </dd>
        </dd>
      </dl>
      <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?> 
      <?php endif; ?>
      <div class="clear"></div>
    </div>
    <div class="clear"></div>
    <div id="q2a_main">
      <div class="question_header">
        <div id="title">
          <h1><?php if (! empty ( $this->_var['category_detail'] )): ?><?php echo $this->_var['category_detail']['name']; ?><?php else: ?>全部<?php endif; ?></h1>
        </div>
        <div id="tabs"> <a href="<?php echo $this->_var['site_url']; ?>question/list/<?php echo $this->_var['category_detail']['id']; ?>#tabs" <?php if ($this->_var['current_type'] == 'all'): ?>class='current'<?php endif; ?>>所有问题</a> <a href="<?php echo $this->_var['site_url']; ?>question/answered/<?php echo $this->_var['category_detail']['id']; ?>#tabs" <?php if ($this->_var['current_type'] == 'answered'): ?>class='current'<?php endif; ?>>已经回答</a> <a href="<?php echo $this->_var['site_url']; ?>question/unanswered/<?php echo $this->_var['category_detail']['id']; ?>#tabs" <?php if ($this->_var['current_type'] == 'unanswer'): ?>class='current'<?php endif; ?>>尚未回答</a> <a href="<?php echo $this->_var['site_url']; ?>question/hot/<?php echo $this->_var['category_detail']['id']; ?>#tabs" class="hot <?php if ($this->_var['current_type'] == 'hot'): ?>current<?php endif; ?>" >热门</a> </div>
        <div class="clear"></div>
      </div>
      <div class="all_question"> <?php $_from = $this->_var['question_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'list');if (count($_from)):
    foreach ($_from AS $this->_var['list']):
?>
        <div class="all_question_list">
          <div class="gr_pic"> <a href="#"><img src="<?php echo $this->_var['list']['avatar_path']; ?>" width="60px" height="60px"/></a>
            <p><a href="#">他的主页</a></p>
          </div>
          <div class="show_question">
            <p class="p1"><a href="<?php echo $this->_var['list']['url']; ?>"><?php echo $this->_var['list']['name']; ?></a></p>
            <p><?php echo Text::limit_chars(htmlspecialchars($this->_var['list']['content']),35); ?></p>
            <p class="tags_list">
              <?php if (count ( $this->_var['list']['tags'] ) > 0): ?>
              <?php $_from = $this->_var['list']['tags']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'tags');if (count($_from)):
    foreach ($_from AS $this->_var['tags']):
?>
             <a href='<?php echo $this->_var['site_url']; ?>question/tag/<?php echo $this->_var['tags']['id']; ?>' class='tag project' title='<?php echo $this->_var['tags']['name']; ?>'><?php echo $this->_var['tags']['name']; ?></a>
              <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
              <?php endif; ?>
            </p>
            <div class="clear"></div>
            <p> <?php echo $this->_var['list']['username']; ?> 发布于 <?php echo $this->_var['list']['timeformat']; ?></p>
          </div>
          <div class="all_state">
            <ul id="all_state_list">
              <li>
                <p><a href="#"><?php echo $this->_var['list']['answer_count']; ?></a></p>
                <p><a href="#">回答</a></p>
              </li>
              <li>
                <p ><a href="#"><?php echo $this->_var['list']['votes']; ?></a></p>
                <p ><a href="#">投票</a></p>
              </li>
              <li>
                <p ><a href="#"><?php echo $this->_var['list']['view_count']; ?></a></p>
                <p ><a href="#">浏览</a></p>
              </li>
            </ul>
          </div>
          <div class="clear"></div>
        </div>
        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>  <?php echo $this->_var['page']; ?> </div>
      <div class="clear"></div>
    </div>
    <div class="clear"></div>
  </div>
  <div id="q2a_list_right">
    <div class="no_answer">
      <p>找不到想要的答案</p>
      <div><a href="<?php echo $this->_var['site_url']; ?>question/ask">我要提问</a></div>
    </div>
    <div class="hot_tags">
      <div class="hot_tags_top">
        <h3>热门标签</h3>
        <span><a href="#">更多>></a></span></div>
      <p class="tags_list"> <?php if (count ( $this->_var['hot_tags'] ) > 0): ?>
        <?php $_from = $this->_var['hot_tags']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'tags');if (count($_from)):
    foreach ($_from AS $this->_var['tags']):
?> <a href='<?php echo $this->_var['site_url']; ?>question/tag/<?php echo $this->_var['tags']['id']; ?>' class='tag project' title='<?php echo $this->_var['tags']['name']; ?>'><?php echo $this->_var['tags']['name']; ?><em>(<?php echo $this->_var['tags']['post_count']; ?>)</em></a> <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
        <?php endif; ?> </p>
    </div>
    <div class="clear"></div>
    <div class="active_population">
      <div class="hot_tags_top">
        <h3>活跃人群</h3>
      </div>
      <ul id="population_list">
        <li> <img src="<?php echo $this->_var['images_path']; ?>/per_pic.png" /><br/>
          <p><a href="">花夕絮</a></p>
        </li>
        <li> <img src="<?php echo $this->_var['images_path']; ?>/per_pic.png"/><br/>
          <p><a href="">花夕絮</a></p>
        </li>
        <li> <img src="<?php echo $this->_var['images_path']; ?>/per_pic.png" /><br/>
          <p><a href="">花夕絮</a></p>
        </li>
        <li> <img src="<?php echo $this->_var['images_path']; ?>/per_pic.png"/><br/>
          <p><a href="">花夕絮</a></p>
        </li>
        <li> <img src="<?php echo $this->_var['images_path']; ?>/per_pic.png" /><br/>
          <p><a href="">花夕絮</a></p>
        </li>
        <li> <img src="<?php echo $this->_var['images_path']; ?>/per_pic.png"/><br/>
          <p><a href="">花夕絮</a></p>
        </li>
      </ul>
    </div>
  </div>
  <div class="clear"></div>
</div>
<?php echo $this->fetch('footer.html'); ?>
</body>
</html>
